<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>数组去空格</title>
	</head>
	<body>
		<script>
			var arr = ['aa',1,'','bc',11,'','','mn'];
			for(var i=0;i<arr.length;i++){
				if(arr[i]==''){
					arr.splice(i,1);
					i--;
				}
			}
			console.log(JSON.parse(JSON.stringify(arr)));
		</script>
	</body>
</html>
